package cn.tedu.springdemo.day06;

import cn.tedu.springdemo.day05.UserDao;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Tests测试类
 */
public class Tests {
    /**
     * 如果bean属性值为类（引用类型）
     */
    @Test
    public void test01(){
        ApplicationContext ac=new ClassPathXmlApplicationContext("applicationContext13.xml");
        AngelaBaby ab=(AngelaBaby) ac.getBean("baby");
        System.out.println(ab);
        ((ClassPathXmlApplicationContext)ac).close();
    }
}
